<include file="Public:header" />
<script type="text/javascript">
    <!--
    var cityUrl = "{:U('City/get/provinceid')}/";
    var areaUrl = "{:U('Area/get/cityid')}/";
    //-->
</script>
<div class="title">
    <span>商场管理</span>
</div>
<div class="list">
    <form action="" method="post" enctype="multipart/form-data">
        <table>
            <tr>
                <td colspan="2" height="50" class="adds">
                    <strong class="">添加商场</strong>
                    <a href="{:U('/Market/')}">返回</a>
                </td>
            </tr>
            <tr>
                <td>
                    地区:
                </td>
                <td>
                    省
                    <select name="province" id="province">
                        <foreach name="province" item="p">
                            <option value="{$p.code}"
                                <if condition="$market.province == $p['code']">
                                    selected="selected"
                                </if>>{$p.name}
                            </option>
                        </foreach>
                    </select>
                    市 
                    <select name="city" id="city">
                        <option value="{$market.city}">{$market.cName}</option>
                    </select>
                    区
                    <select name="area" id="area">
                        <option value="{$market.area}">{$market.aName}</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td>
                    商圈：
                </td>
                <td>
                <select name="bus" id="bus">
                    <foreach name="bus" item="b">
                        <option value="{$b.id}"
                            <if condition="$market.cbd == $b['db_id']">
                                selected="selected"
                            </if>>{$b.name}
                        </option>
                    </foreach>
                </select>
            </tr>
            <tr>
                <td>
                    名称:
                </td>
                <td>
                    <input name="mName" type="text" maxlength="50" value="{$market.name}" />
                </td>
            </tr>
            <tr>
                <td>
                    拼音:
                </td>
                <td>
                    <input name="fChar" type="text" maxlength="100" value="{$market.initial}" />
                </td>
            </tr>
            <tr>
                <td>
                    原图:
                </td>
                <td>
                    <img alt="" src="{$imageUrl}" style="max-width: 200px;">
                </td>
            </tr>
            <tr>
                <td>
                    图片:
                </td>
                <td>
                    <input type="file" name="image">
                </td>
            </tr>
            <tr>
                <td>
                    营业时间:
                </td>
                <td>
                    {:W('OnlineEditor',array('name'=>'bTime','centent'=>$market['b_time']))}
                </td>
            </tr>
            <tr>
                <td>
                    简介:
                </td>
                <td>
                    {:W('OnlineEditor',array('name'=>'marketIntr','centent'=>$market['intr']))}
                </td>
            </tr>
                        <tr>
                <td>
                    联系商场:
                </td>
                <td>
                    {:W('OnlineEditor',array('name'=>'contact','centent'=>$market['contact']))}
                </td>
            </tr>
            <tr>
                <td colspan="2" height="50">
                    <input type="submit" class="butj" value=" 提交 " />
                </td>
            </tr>
        </table>
    </form>
</div><include file="Public:footer" />
<script type="text/javascript">
    $('#province').address();
</script>
